<template>
	<view class="wrap">
		<u-navbar :title="$t('jyxq')"  title-width="340" :border-bottom="false" back-icon-color="#fff" title-color="#fff" :background="{ backgroundColor: '#0030A8' }"></u-navbar>
		<view class="tom-container">
			<view class="list">
				<view class="cell">
					<view class="left">{{$t('clid')}}</view>
					<view class="right" @tap="copy(pageData.tacticsId)">{{pageData.tacticsId}}<u-icon name="fuzhi" custom-prefix="custom-icon" size="28" style="margin-left: 12rpx;"></u-icon></view>
				</view>
				<view class="cell">
					<view class="left">{{$t('xdje')}}</view>
					<view class="right">{{pageData.money}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('xdsl')}}</view>
					<view class="right">{{pageData.amount}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('junjia')}}</view>
					<view class="right">{{pageData.avgPrice}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('jylx')}}</view>
					<view class="right">{{pageData.type ==1? $t('mairu'):$t('maichu')}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('cjsl')}}</view>
					<view class="right">{{pageData.fieldAmount}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('cjje')}}</view>
					<view class="right">{{pageData.fieldCashAmount}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('sxf')}}</view>
					<view class="right">{{pageData.fieldFees}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('ddzt')}}</view>
					<view class="right">{{pageData.state  ==1 ? $t('ycj'):pageData.state  ==2 ? $t('bfcj'):$t('wcj')}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('sfcd')}}</view>
					<view class="right">{{pageData.cancelFlag ==1? $t('chedan'):$t('weichedan')}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('sfsd')}}</view>
					<view class="right">{{pageData.first == 1 ? $t('shoudan'):$t('fshoudan')}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('jysmc')}}</view>
					<view class="right">{{pageData.exchangeName}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('bzd')}}</view>
					<view class="right">{{pageData.exchangeCoin}}</view>
				</view>
				<view class="cell">
					<view class="left">{{$t('xdsj')}}</view>
					<view class="right">{{pageData.createDate}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			pageData:{},
			id:'',
		};
	},
	onShow() {
		this.indexData();
	},
	onLoad(options) {
		var open =JSON.parse(options.item);
		this.id=open.id;
		console.log(this.id)
	},
	methods: {
		indexData(){
			this.$api.consoleApi.getTransactionInfo({
				id:this.id,
			}).then(res => {
				this.pageData = res.data;
			})
		},
		copy(val){
			this.$utils.copy(val);
		},
	}
};
</script>

<style lang="scss" scoped>
.list {
	flex: 1;
	border-radius: 20rpx;
	overflow: auto;
	background-color: #fff;
	margin: $nr-padd;
	.cell{
		display: flex;
		align-items: center;
		justify-content: space-between;
		border: 2rpx solid $page-bg;
		padding: 30rpx $nr-padd;
		.left{
			color: $tom-text-color;
			font-size: 28rpx;
			font-weight: bold;
			width: 210rpx;
		}
		.right{
			color: $tom-text-sub-color;
			font-size: 28rpx;
		}
	}
}
</style>